package helperClassPassMarkers;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
import utils.Utils;

public class CreateMessagesProperties {
	private static int h = 0;

	public static void createMessagesProperties(String fileName, int xlsSheet1, int xlsSheet2, int xlsSheet3, int xlsSheet4, int xlsSheet5, int xlsSheet6, int xlsSheet7, int xlsSheet8, int xlsSheet9, int xlsSheet10, int xlsSheet11, int xlsSheet12) {
		File replacedFile = new File(fileName);
		replacedFile.delete();

		if (fileName.endsWith("MyMessages.properties") || fileName.endsWith("MyMessagesPlanned.properties") || fileName.endsWith("MyMessagesProTour.properties")|| fileName.endsWith("MyMessagesClimbs.properties")) {
			h = 0;
		}

		if (fileName.endsWith("MyMessages_de.properties") || fileName.endsWith("MyMessagesPlanned_de.properties") || fileName.endsWith("MyMessagesProTour_de.properties")|| fileName.endsWith("MyMessagesClimbs_de.properties")) {
			h = 1;
		}
		if (fileName.endsWith("MyMessages_nl.properties") || fileName.endsWith("MyMessagesPlanned_nl.properties") || fileName.endsWith("MyMessagesProTour_nl.properties") || fileName.endsWith("MyMessagesClimbs_nl.properties")) {
			h = 2;
		}
		if (fileName.endsWith("MyMessages_it.properties") || fileName.endsWith("MyMessagesPlanned_it.properties") || fileName.endsWith("MyMessagesProTour_it.properties") || fileName.endsWith("MyMessagesClimbs_it.properties")) {
			h = 3;
		}
		if (fileName.endsWith("MyMessages_fr.properties") || fileName.endsWith("MyMessagesPlanned_fr.properties") || fileName.endsWith("MyMessagesProTour_fr.properties") || fileName.endsWith("MyMessagesClimbs_fr.properties")) {
			h = 4;
		}

		try {
			Workbook workbook = Workbook.getWorkbook(new File("C:\\Documents and Settings\\Administrator\\My Documents\\Dropbox\\CTA\\XLS\\CTA.xls"));
			Sheet sheet = workbook.getSheet(xlsSheet1);
			Cell[] count = sheet.getColumn(0);
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter textFile = new BufferedWriter(fstream);

			for (int i = 1; i < count.length; i++) {
				Cell passNameCell = sheet.getCell(3, i);
				Cell passNameENCell = sheet.getCell(4 + h, i);
				String passNameEN = passNameENCell.getContents();
				String passName = passNameCell.getContents();
				String replaced = Utils.replaceUTF8(passNameEN);
				textFile.write(passName + "					= " + replaced + "\n");

			}

			for (int j = 1; j < count.length; j++) {
				Cell passDescriptionCell = sheet.getCell(10, j);
				Cell passDescriptionENCell = sheet.getCell(11 + h, j);
				String passDescription = passDescriptionCell.getContents();
				String passDescriptionEN = passDescriptionENCell.getContents();
				if (!passDescriptionEN.endsWith("NOP")) {
					String replaced = Utils.replaceUTF8(passDescriptionEN);
					textFile.write(passDescription + "					= " + replaced + "\n");
				}
			}
			for (int l = 1; l < count.length; l++) {
				Cell passWebelementCell = sheet.getCell(17, l);
				Cell passWebelementENCell = sheet.getCell(18 + h, l);
				String passWebelement = passWebelementCell.getContents();
				String passWebelementEN = passWebelementENCell.getContents();
				textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

			}

			for (int k = 1; k < count.length; k++) {
				Cell passLinkCell = sheet.getCell(34, k);
				Cell passLinkENCell = sheet.getCell(35 + h, k);
				String passLink = passLinkCell.getContents();
				String passLinkEN = passLinkENCell.getContents();

				textFile.write(passLink + "					= " + passLinkEN + "\n");

			}

			for (int m = 1; m < count.length; m++) {
				Cell passOracleENCell = sheet.getCell(4 + h, m);
				Cell passOracleCell = sheet.getCell(40, m);
				String passOracle = passOracleCell.getContents();
				String passOracleEN = passOracleENCell.getContents();
				String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
				textFile.write(passOracle + "					= " + replacedOracle + "\n");

			}
			textFile.write("\n");
			if (xlsSheet2 > 0) {
				Sheet sheet2 = workbook.getSheet(xlsSheet2);
				Cell[] count2 = sheet2.getColumn(0);
				for (int i = 1; i < count2.length; i++) {
					Cell passNameCell = sheet2.getCell(3, i);
					Cell passNameENCell = sheet2.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count2.length; j++) {
					Cell passDescriptionCell = sheet2.getCell(10, j);
					Cell passDescriptionENCell = sheet2.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count2.length; l++) {
					Cell passWebelementCell = sheet2.getCell(17, l);
					Cell passWebelementENCell = sheet2.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count2.length; k++) {
					Cell passLinkCell = sheet2.getCell(34, k);
					Cell passLinkENCell = sheet2.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();

					textFile.write(passLink + "					= " + passLinkEN + "\n");

				}

				for (int m = 1; m < count2.length; m++) {
					Cell passOracleENCell = sheet2.getCell(4 + h, m);
					Cell passOracleCell = sheet2.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
			}
			textFile.write("\n");
			if (xlsSheet3 > 0) {
				Sheet sheet3 = workbook.getSheet(xlsSheet3);
				Cell[] count3 = sheet3.getColumn(0);
				for (int i = 1; i < count3.length; i++) {
					Cell passNameCell = sheet3.getCell(3, i);
					Cell passNameENCell = sheet3.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count3.length; j++) {
					Cell passDescriptionCell = sheet3.getCell(10, j);
					Cell passDescriptionENCell = sheet3.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count3.length; l++) {
					Cell passWebelementCell = sheet3.getCell(17, l);
					Cell passWebelementENCell = sheet3.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count3.length; k++) {
					Cell passLinkCell = sheet3.getCell(34, k);
					Cell passLinkENCell = sheet3.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();
					textFile.write(passLink + "					= " + passLinkEN + "\n");
				}

				for (int m = 1; m < count3.length; m++) {
					Cell passOracleENCell = sheet3.getCell(4 + h, m);
					Cell passOracleCell = sheet3.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
			}
			textFile.write("\n");
			if (xlsSheet4 > 0) {
				Sheet sheet4 = workbook.getSheet(xlsSheet4);
				Cell[] count4 = sheet4.getColumn(0);
				for (int i = 1; i < count4.length; i++) {
					Cell passNameCell = sheet4.getCell(3, i);
					Cell passNameENCell = sheet4.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count4.length; j++) {
					Cell passDescriptionCell = sheet4.getCell(10, j);
					Cell passDescriptionENCell = sheet4.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count4.length; l++) {
					Cell passWebelementCell = sheet4.getCell(17, l);
					Cell passWebelementENCell = sheet4.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count4.length; k++) {
					Cell passLinkCell = sheet4.getCell(34, k);
					Cell passLinkENCell = sheet4.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();
					textFile.write(passLink + "					= " + passLinkEN + "\n");
				}

				for (int m = 1; m < count4.length; m++) {
					Cell passOracleENCell = sheet4.getCell(4 + h, m);
					Cell passOracleCell = sheet4.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
			}
			textFile.write("\n");
			if (xlsSheet5 > 0) {
				Sheet sheet5 = workbook.getSheet(xlsSheet5);
				Cell[] count5 = sheet5.getColumn(0);
				for (int i = 1; i < count5.length; i++) {
					Cell passNameCell = sheet5.getCell(3, i);
					Cell passNameENCell = sheet5.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count5.length; j++) {
					Cell passDescriptionCell = sheet5.getCell(10, j);
					Cell passDescriptionENCell = sheet5.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count5.length; l++) {
					Cell passWebelementCell = sheet5.getCell(17, l);
					Cell passWebelementENCell = sheet5.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count5.length; k++) {
					Cell passLinkCell = sheet5.getCell(34, k);
					Cell passLinkENCell = sheet5.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();
					textFile.write(passLink + "					= " + passLinkEN + "\n");
				}

				for (int m = 1; m < count5.length; m++) {
					Cell passOracleENCell = sheet5.getCell(4 + h, m);
					Cell passOracleCell = sheet5.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
			}
			
			textFile.write("\n");
			if (xlsSheet6 > 0) {
				Sheet sheet6 = workbook.getSheet(xlsSheet6);
				Cell[] count6 = sheet6.getColumn(0);
				for (int i = 1; i < count6.length; i++) {
					Cell passNameCell = sheet6.getCell(3, i);
					Cell passNameENCell = sheet6.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count6.length; j++) {
					Cell passDescriptionCell = sheet6.getCell(10, j);
					Cell passDescriptionENCell = sheet6.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count6.length; l++) {
					Cell passWebelementCell = sheet6.getCell(17, l);
					Cell passWebelementENCell = sheet6.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count6.length; k++) {
					Cell passLinkCell = sheet6.getCell(34, k);
					Cell passLinkENCell = sheet6.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();
					textFile.write(passLink + "					= " + passLinkEN + "\n");
				}

				for (int m = 1; m < count6.length; m++) {
					Cell passOracleENCell = sheet6.getCell(4 + h, m);
					Cell passOracleCell = sheet6.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
			}
			if (xlsSheet7 > 0) {
				Sheet sheet7 = workbook.getSheet(xlsSheet7);
				Cell[] count7 = sheet7.getColumn(0);
				for (int i = 1; i < count7.length; i++) {
					Cell passNameCell = sheet7.getCell(3, i);
					Cell passNameENCell = sheet7.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count7.length; j++) {
					Cell passDescriptionCell = sheet7.getCell(10, j);
					Cell passDescriptionENCell = sheet7.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count7.length; l++) {
					Cell passWebelementCell = sheet7.getCell(17, l);
					Cell passWebelementENCell = sheet7.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count7.length; k++) {
					Cell passLinkCell = sheet7.getCell(34, k);
					Cell passLinkENCell = sheet7.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();
					textFile.write(passLink + "					= " + passLinkEN + "\n");
				}

				for (int m = 1; m < count7.length; m++) {
					Cell passOracleENCell = sheet7.getCell(4 + h, m);
					Cell passOracleCell = sheet7.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
			}
			if (xlsSheet8 > 0) {
				Sheet sheet8 = workbook.getSheet(xlsSheet8);
				Cell[] count8 = sheet8.getColumn(0);
				for (int i = 1; i < count8.length; i++) {
					Cell passNameCell = sheet8.getCell(3, i);
					Cell passNameENCell = sheet8.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count8.length; j++) {
					Cell passDescriptionCell = sheet8.getCell(10, j);
					Cell passDescriptionENCell = sheet8.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count8.length; l++) {
					Cell passWebelementCell = sheet8.getCell(17, l);
					Cell passWebelementENCell = sheet8.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count8.length; k++) {
					Cell passLinkCell = sheet8.getCell(34, k);
					Cell passLinkENCell = sheet8.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();
					textFile.write(passLink + "					= " + passLinkEN + "\n");
				}

				for (int m = 1; m < count8.length; m++) {
					Cell passOracleENCell = sheet8.getCell(4 + h, m);
					Cell passOracleCell = sheet8.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
			}
			if (xlsSheet9 > 0) {
				Sheet sheet9 = workbook.getSheet(xlsSheet9);
				Cell[] count9 = sheet9.getColumn(0);
				for (int i = 1; i < count9.length; i++) {
					Cell passNameCell = sheet9.getCell(3, i);
					Cell passNameENCell = sheet9.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count9.length; j++) {
					Cell passDescriptionCell = sheet9.getCell(10, j);
					Cell passDescriptionENCell = sheet9.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count9.length; l++) {
					Cell passWebelementCell = sheet9.getCell(17, l);
					Cell passWebelementENCell = sheet9.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count9.length; k++) {
					Cell passLinkCell = sheet9.getCell(34, k);
					Cell passLinkENCell = sheet9.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();
					textFile.write(passLink + "					= " + passLinkEN + "\n");
				}

				for (int m = 1; m < count9.length; m++) {
					Cell passOracleENCell = sheet9.getCell(4 + h, m);
					Cell passOracleCell = sheet9.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
			}
			if (xlsSheet10 > 0) {
				Sheet sheet10 = workbook.getSheet(xlsSheet10);
				Cell[] count10 = sheet10.getColumn(0);
				for (int i = 1; i < count10.length; i++) {
					Cell passNameCell = sheet10.getCell(3, i);
					Cell passNameENCell = sheet10.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count10.length; j++) {
					Cell passDescriptionCell = sheet10.getCell(10, j);
					Cell passDescriptionENCell = sheet10.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count10.length; l++) {
					Cell passWebelementCell = sheet10.getCell(17, l);
					Cell passWebelementENCell = sheet10.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count10.length; k++) {
					Cell passLinkCell = sheet10.getCell(34, k);
					Cell passLinkENCell = sheet10.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();
					textFile.write(passLink + "					= " + passLinkEN + "\n");
				}

				for (int m = 1; m < count10.length; m++) {
					Cell passOracleENCell = sheet10.getCell(4 + h, m);
					Cell passOracleCell = sheet10.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
			}
			if (xlsSheet11 > 0) {
				Sheet sheet11 = workbook.getSheet(xlsSheet11);
				Cell[] count11 = sheet11.getColumn(0);
				for (int i = 1; i < count11.length; i++) {
					Cell passNameCell = sheet11.getCell(3, i);
					Cell passNameENCell = sheet11.getCell(4 + h, i);
					String passNameEN = passNameENCell.getContents();
					String passName = passNameCell.getContents();
					String replaced = Utils.replaceUTF8(passNameEN);
					textFile.write(passName + "					= " + replaced + "\n");

				}

				for (int j = 1; j < count11.length; j++) {
					Cell passDescriptionCell = sheet11.getCell(10, j);
					Cell passDescriptionENCell = sheet11.getCell(11 + h, j);
					String passDescription = passDescriptionCell.getContents();
					String passDescriptionEN = passDescriptionENCell.getContents();
					if (!passDescriptionEN.endsWith("NOP")) {
						String replaced = Utils.replaceUTF8(passDescriptionEN);
						textFile.write(passDescription + "					= " + replaced + "\n");
					}

				}
				for (int l = 1; l < count11.length; l++) {
					Cell passWebelementCell = sheet11.getCell(17, l);
					Cell passWebelementENCell = sheet11.getCell(18 + h, l);
					String passWebelement = passWebelementCell.getContents();
					String passWebelementEN = passWebelementENCell.getContents();
					textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

				}
				for (int k = 1; k < count11.length; k++) {
					Cell passLinkCell = sheet11.getCell(34, k);
					Cell passLinkENCell = sheet11.getCell(35 + h, k);
					String passLink = passLinkCell.getContents();
					String passLinkEN = passLinkENCell.getContents();
					textFile.write(passLink + "					= " + passLinkEN + "\n");
				}

				for (int m = 1; m < count11.length; m++) {
					Cell passOracleENCell = sheet11.getCell(4 + h, m);
					Cell passOracleCell = sheet11.getCell(40, m);
					String passOracle = passOracleCell.getContents();
					String passOracleEN = passOracleENCell.getContents();
					String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
					textFile.write(passOracle + "					= " + replacedOracle + "\n");

				}
				if (xlsSheet12 > 0) {
					Sheet sheet12 = workbook.getSheet(xlsSheet12);
					Cell[] count12 = sheet12.getColumn(0);
					for (int i = 1; i < count12.length; i++) {
						Cell passNameCell = sheet12.getCell(3, i);
						Cell passNameENCell = sheet12.getCell(4 + h, i);
						String passNameEN = passNameENCell.getContents();
						String passName = passNameCell.getContents();
						String replaced = Utils.replaceUTF8(passNameEN);
						textFile.write(passName + "					= " + replaced + "\n");

					}

					for (int j = 1; j < count12.length; j++) {
						Cell passDescriptionCell = sheet12.getCell(10, j);
						Cell passDescriptionENCell = sheet12.getCell(11 + h, j);
						String passDescription = passDescriptionCell.getContents();
						String passDescriptionEN = passDescriptionENCell.getContents();
						if (!passDescriptionEN.endsWith("NOP")) {
							String replaced = Utils.replaceUTF8(passDescriptionEN);
							textFile.write(passDescription + "					= " + replaced + "\n");
						}

					}
					for (int l = 1; l < count12.length; l++) {
						Cell passWebelementCell = sheet12.getCell(17, l);
						Cell passWebelementENCell = sheet12.getCell(18 + h, l);
						String passWebelement = passWebelementCell.getContents();
						String passWebelementEN = passWebelementENCell.getContents();
						textFile.write(passWebelement + "					= " + passWebelementEN + "\n");

					}
					for (int k = 1; k < count12.length; k++) {
						Cell passLinkCell = sheet12.getCell(34, k);
						Cell passLinkENCell = sheet12.getCell(35 + h, k);
						String passLink = passLinkCell.getContents();
						String passLinkEN = passLinkENCell.getContents();
						textFile.write(passLink + "					= " + passLinkEN + "\n");
					}

					for (int m = 1; m < count12.length; m++) {
						Cell passOracleENCell = sheet12.getCell(4 + h, m);
						Cell passOracleCell = sheet12.getCell(40, m);
						String passOracle = passOracleCell.getContents();
						String passOracleEN = passOracleENCell.getContents();
						String replacedOracle = Utils.replaceUTF8Oracle(passOracleEN);
						textFile.write(passOracle + "					= " + replacedOracle + "\n");

					}
				}

			}
			
			if (fileName.endsWith("MyMessages.properties")) {
				textFile.write("ContextMenuZoomin					= Zoom in\n");
				textFile.write("ContextMenuToggleRoute				= Show Route\n");
				textFile.write("ContextMenuVideo					= Video\n");
				textFile.write("ContextMenuPictures					= Pictures\n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				textFile.write("ContextMenuBikemap					= Bikemap\n");
				textFile.write("ContextMenuStreetview				= Street Tour -->\n");
				textFile.write("ContextMenuStreetviewReverse        = Street Tour <--\n");
				textFile.write("ContextMenuMotorbike				= Motorbike Video\n");
				textFile.write("ContextMenu3D						= 3D\n");
				textFile.write("ContextMenu3DTour					= 3D Tour -->\n");
				textFile.write("ContextMenutourReverse				= 3D Tour <--\n");
				textFile.write("ContextMenuGame						= Game\n");
				textFile.write("ContextMenuClimbbybike				= Climb by bike\n");
				textFile.write("ContextMenuZoomout					= Zoom out\n");
				textFile.write("ContextMenuQuaeldich				= Qualedich\n");
				textFile.write("ContextMenuProfile					= Profile\n");
				textFile.write("ContextMenuExplore					= Explore in 3D\n");
				textFile.write("\n");
				textFile.write("EntryDialogTitle					= Welcome to Cycling the Alps and start exploring!\n");
				textFile.write("EntryDialogShowAgain				= Do not show this video again.\n");
				textFile.write("EntryDialogMessage1					= Close this dialog to get an amazing virtual experience of the alps.\n");
				textFile.write("EntryDialogMessage2					= Close\n");
				textFile.write("EntryDialogMessage3					= Use your right mouse button on the cycling icons!\n");
				textFile.write("\n");
				textFile.write("webElementNews						= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20News' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("webElementComments					= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("webElementProblems					= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20Problems' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("webElementMissingPasses				= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20Missing%20Passes' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("\n");
				textFile.write("MenuBarPasses2000					= 2000m - 2770m\n");
				textFile.write("MenuBarPasses1500					= 1500m - 1999m\n");
				textFile.write("MenuBarPasses1000					= 1000m - 1499m\n");
				textFile.write("MenuBarOtherPasses					= 0000m - 0999m\n");
				textFile.write("MenuBarToggleLayers					= Passes\n");
				textFile.write("MenuBarAdditionalInformation		= More\n");
				textFile.write("MenuBarComment						= Comments\n");
				textFile.write("MenuBarSleep						= Explore\n");
				textFile.write("MenuBarLatest						= Latest\n");
				textFile.write("MenuBarLanguages					= Languages\n");
				textFile.write("MenuBarEnglish						= English\n");
				textFile.write("MenuBarGerman						= German\n");
				textFile.write("MenuBarNetherlands					= Netherlands\n");
				textFile.write("MenuBarItalian						= Italian\n");
				textFile.write("MenuBarImpressum					= Impressum\n");
				textFile.write("MenuBarHelp							= Help\n");
				textFile.write("MenuBarHelpme						= Help me!\n");
				textFile.write("MenuBarDisclaimer					= Disclaimer\n");
				textFile.write("MenuBarContact						= Contact\n");
				textFile.write("MenuBarMissingPasses				= Missing Passes\n");
				textFile.write("MenuBarProblems						= Problems\n");
				textFile.write("MenuBarConversation					= Conversation\n");
				textFile.write("MenuBarMountains4000				= Mountains 4000m\n");
				textFile.write("\n");
				textFile.write("news								= News\n");
				textFile.write("\n");
				textFile.write("suggest 							= Search:\n");
				textFile.write("ReportProblem						= Report Problem\n");
				textFile.write("\n");
				textFile.write("embed								= Embed\n");
				textFile.write("embedNoPlay							= Embed no autoplay\n");
				textFile.write("embedHtml							= Paste HTML to embed in website\n");
				textFile.write("\n");
				textFile.write("OverviewOracle						= Overview\n");
				textFile.write("OverviewLink						= overview\n");
				textFile.write("\n");
				textFile.write("gameExplanation						= Use your arrow keys to cycle this pass. \n");
				textFile.write("GameExplanationShowAgain			= Do not show the explanation again.\n");
				textFile.write("GameButton							= Start Cycling this Pass!\n");
				textFile.write("\n");
				textFile.write("exploreExplanation					= Use the following keys to explore this pass.\n");
				textFile.write("Forwards							= Forwards\n");
				textFile.write("Backwards							= Backwards\n");
				textFile.write("Straferight							= Strafe right\n");
				textFile.write("Strafeleft							= Strafe left\n");
				textFile.write("Arrow								= Up Arrow = Tilt up<br>Down Arrow = Tilt Down<br>Right Arrow = Turn Right<BR>Left Arrow = Turn left\n");
				textFile.write("Page								= Page Up = Move up<br>Page Down = Move down\n");
				textFile.write("ExploreButton						= Start exploring this pass!\n");
			}
			if (fileName.endsWith("MyMessages_de.properties")) {
				textFile.write("ContextMenuZoomin					= Einzoomen\n");
				textFile.write("ContextMenuToggleRoute				= Toggle Route\n");
				textFile.write("ContextMenuVideo					= Video\n");
				textFile.write("ContextMenuPictures					= Bilder\n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				textFile.write("ContextMenuBikemap					= Bikemap\n");
				textFile.write("ContextMenuStreetview				= Street Tour -->\n");
				textFile.write("ContextMenuStreetviewReverse        = Street Tour <--\n");
				textFile.write("ContextMenuMotorbike				= Motorrad Video\n");
				textFile.write("ContextMenu3D						= 3D\n");
				textFile.write("ContextMenu3DTour					= 3D Tour -->\n");
				textFile.write("ContextMenutourReverse				= 3D Tour <--\n");
				textFile.write("ContextMenuGame						= Spiel\n");
				textFile.write("ContextMenuClimbbybike				= Climb by bike\n");
				textFile.write("ContextMenuZoomout					= Auszoomen\n");
				textFile.write("ContextMenuQuaeldich				= Quaeldich\n");
				textFile.write("ContextMenuProfile					= Profile\n");
				textFile.write("ContextMenuExplore					= 3D Erkunden\n");
				textFile.write("\n");
				textFile.write("EntryDialogTitle					= Willkommen bei Cycling the Alps, wie funktioniert diese Website?\n");
				textFile.write("EntryDialogShowAgain				= Video nicht mehr anzeigen.\n");
				textFile.write("EntryDialogMessage1					= Schliessen Sie dieses Fenster, fuer eine faszinierende virtuelle Reise durch die Alpen.\n");
				textFile.write("EntryDialogMessage2					= Schlie&#223;en\n");
				textFile.write("EntryDialogMessage3					= Mit der Rechte Maustaste haben Sie direktem Zugriff auf verschiedene Informationen.\n");
				textFile.write("\n");
				textFile.write("webElementNews						= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20Neuigkeiten' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("webElementComments					= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20kommentar%20' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("webElementProblems					= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20Probleme' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("webElementMissingPasses				= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20Fehlende%20P&#228;sse' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("\n");
				textFile.write("MenuBarPasses2000					= 2000m - 2770m\n");
				textFile.write("MenuBarPasses1500					= 1500m - 1999m\n");
				textFile.write("MenuBarPasses1000					= 1000m - 1499m\n");
				textFile.write("MenuBarOtherPasses					=    0m -  999m\n");
				textFile.write("MenuBarToggleLayers					= P&#228;sse\n");
				textFile.write("MenuBarAdditionalInformation		= Mehr\n");
				textFile.write("MenuBarSleep						= Erkunden\n");
				textFile.write("MenuBarComment						= Kommentar\n");
				textFile.write("MenuBarLatest						= Aktuelles\n");
				textFile.write("MenuBarLanguages					= Sprache\n");
				textFile.write("MenuBarEnglish						= Englisch\n");
				textFile.write("MenuBarGerman						= Deutsch\n");
				textFile.write("MenuBarNetherlands					= Niederl&#228;ndisch\n");
				textFile.write("MenuBarItalian						= Italienisch\n");
				textFile.write("MenuBarImpressum					= Impressum\n");
				textFile.write("MenuBarHelp							= Hilfe\n");
				textFile.write("MenuBarHelpme						= Helfen Sie mir!\n");
				textFile.write("MenuBarDisclaimer					= Datenschutzbestimmungen\n");
				textFile.write("MenuBarContact						= Kontakt\n");
				textFile.write("MenuBarMissingPasses				= Fehlende P&#228;sse\n");
				textFile.write("MenuBarProblems						= Problemen\n");
				textFile.write("MenuBarConversation					= Konversation\n");
				textFile.write("MenuBarMountains4000				= Bergen 4000m\n");
				textFile.write("\n");
				textFile.write("news								= Neuigkeiten\n");
				textFile.write("\n");
				textFile.write("suggest								= Suche:\n");
				textFile.write("ReportProblem						= Problem melden\n");
				textFile.write("\n");
				textFile.write("embed								= Einbetten\n");
				textFile.write("embedNoPlay							= Einbetten kein autoplay\n");
				textFile.write("embedHtml							= HTML-Code zum Einbetten in eine Website.\n");
				textFile.write("\n");
				textFile.write("OverviewOracle						= Ueberblick\n");
				textFile.write("OverviewLink						= ueberblick\n");
				textFile.write("\n");
				textFile.write("gameExplanation						= Verwende Sie die Pfeiltasten um zu fahren. \n");
				textFile.write("GameExplanationShowAgain			= Erklaerung nicht mehr anzeigen.\n");
				textFile.write("GameButton							= Beginnen!\n");
				textFile.write("\n");
				textFile.write("exploreExplanation					= Verwende Folgende Tasten um diese Pass zu erkunden.\n");
				textFile.write("Forwards							= Nach vorn\n");
				textFile.write("Backwards							= Nach hinten\n");
				textFile.write("Straferight							= Bewege nach rechts\n");
				textFile.write("Strafeleft							= Bewege nach links\n");
				textFile.write("Arrow								= Pfeil oben = Nach oben Schwenken<br>Pfeil unten = Nach unten schwenken<br>Pfeil rechts = Rechts abbiegen<BR>Pfeil links = Links abbiegen\n");
				textFile.write("Page								= Page Up = Nach oben<br>Page Down = Nach unten\n");
				textFile.write("ExploreButton						= Anfangen mit erkunden!\n");
			}
			if (fileName.endsWith("MyMessages_nl.properties")) {
				textFile.write("ContextMenuZoomin					= Inzoomen\n");
				textFile.write("ContextMenuToggleRoute				= Fietsroute\n");
				textFile.write("ContextMenuVideo					= Video\n");
				textFile.write("ContextMenuPictures					= Foto&#145;s\n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				textFile.write("ContextMenuBikemap					= Bikemap\n");
				textFile.write("ContextMenuStreetview				= Street Tour <--\n");
				textFile.write("ContextMenuStreetviewReverse        = Street Tour -->\n");
				textFile.write("ContextMenuMotorbike				= Motor Video\n");
				textFile.write("ContextMenu3D						= 3D\n");
				textFile.write("ContextMenu3DTour					= 3D Tocht -->\n");
				textFile.write("ContextMenutourReverse				= 3D Tocht <--\n");
				textFile.write("ContextMenuGame						= Spel\n");
				textFile.write("ContextMenuClimbbybike				= Climb by bike\n");
				textFile.write("ContextMenuZoomout					= Uitzoomen\n");
				textFile.write("ContextMenuQuaeldich				= Qualedich\n");
				textFile.write("ContextMenuProfile					= Profiel\n");
				textFile.write("ContextMenuExplore					= 3D Verkennen\n");
				textFile.write("\n");
				textFile.write("EntryDialogTitle					= Welkom bij Cycling the Alps en veel plezier bij het verkennen van de Alpen!\n");
				textFile.write("EntryDialogShowAgain				= Introductie video volgende keer niet meer laten zien.\n");
				textFile.write("EntryDialogMessage1					= Sluit dit venster om een fantastische virtuele ervaring van de Alpen te krijgen.\n");
				textFile.write("EntryDialogMessage2					= Sluiten\n");
				textFile.write("EntryDialogMessage3					= Klik met uw rechtermuisknop op de fiets icoontjes .\n");
				textFile.write("\n");
				textFile.write("webElementNews						= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20Nieuws' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("webElementComments					= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20Kommentaar' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("webElementProblems					= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20Problemen' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("webElementMissingPasses				= <iframe frameborder='0' marginwidth='0' marginheight='0' border='0' style='border:0;margin:0;width:800px;height:533px;' src='http://www.google.com/friendconnect/discuss?scope=web&amp;topic=Cycling%20the%20Alps%20ontbrekende%20passen' scrolling='no' allowtransparency='true'></iframe>\n");
				textFile.write("\n");
				textFile.write("MenuBarPasses2000					= 2000m - 2770m\n");
				textFile.write("MenuBarPasses1500					= 1500m - 1999m\n");
				textFile.write("MenuBarPasses1000					= 1000m - 1499m\n");
				textFile.write("MenuBarOtherPasses					=    0m -  999m\n");
				textFile.write("MenuBarToggleLayers					= Passen\n");
				textFile.write("MenuBarAdditionalInformation		= Meer\n");
				textFile.write("MenuBarSleep						= Verkennen\n");
				textFile.write("MenuBarComment						= Commentaar\n");
				textFile.write("MenuBarLatest						= Aktueel\n");
				textFile.write("MenuBarLanguages					= Talen\n");
				textFile.write("MenuBarEnglish						= Engels\n");
				textFile.write("MenuBarGerman						= Duits\n");
				textFile.write("MenuBarNetherlands					= Nederlands\n");
				textFile.write("MenuBarItalian						= Italiaans\n");
				textFile.write("MenuBarImpressum					= Impressum\n");
				textFile.write("MenuBarHelp							= Help\n");
				textFile.write("MenuBarHelpme						= Help mij!\n");
				textFile.write("MenuBarDisclaimer					= Disclaimer\n");
				textFile.write("MenuBarContact						= Contact\n");
				textFile.write("MenuBarMissingPasses				= Ontbrekende Passen\n");
				textFile.write("MenuBarProblems						= Problemen\n");
				textFile.write("MenuBarConversation					= Conversatie\n");
				textFile.write("MenuBarMountains4000				= Bergen 4000m\n");
				textFile.write("\n");
				textFile.write("news								= Nieuws\n");
				textFile.write("\n");
				textFile.write("suggest 							= Zoeken:\n");
				textFile.write("ReportProblem						= Probleem melden\n");
				textFile.write("\n");
				textFile.write("embed								= Embed\n");
				textFile.write("embedNoPlay							= Embed geen autoplay\n");
				textFile.write("embedHtml							= HTML in website plakken\n");
				textFile.write("\n");
				textFile.write("OverviewOracle						= Overzicht\n");
				textFile.write("OverviewLink						= overzicht\n");
				textFile.write("\n");
				textFile.write("gameExplanation						= Gebruik de pijltjes toetsen om te fietsen.\n");
				textFile.write("GameExplanationShowAgain			= Uitleg volgende keer niet meer laten zien.\n");
				textFile.write("GameButton							= Beginnen met fietsen!\n");
				textFile.write("\n");
				textFile.write("exploreExplanation					= Gebruik volgende toetsen om deze pas te verkennen. \n");
				textFile.write("Forwards							= Naar voren\n");
				textFile.write("Backwards							= Naar achteren\n");
				textFile.write("Straferight							= Beweeg naar rechts\n");
				textFile.write("Strafeleft							= Beweeg naar links\n");
				textFile.write("Arrow								= Pijl naar boven = Naar boven kantelen<br>Pijl naar beneden = Naar beneden kantelen<br>Pijl naar rechts = Rechtsaf<BR>Pijl naar links = Linksaf\n");
				textFile.write("Page								= Page Up = Omhoog<br>Page Down = Omlaag\n");
				textFile.write("ExploreButton						= Beginnen met verkennen!\n");

			}
			if (fileName.endsWith("MyMessages_it.properties")) {
				textFile.write("ContextMenuZoomin					= Zoom avanti\n");
				textFile.write("ContextMenuToggleRoute				= Percorso \n");
				textFile.write("ContextMenuVideo					= Video\n");
				textFile.write("ContextMenuPictures					= Fotografie\n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				textFile.write("ContextMenuBikemap					= Itinerario ciclabile\n");
				textFile.write("ContextMenuStreetview				= Street Tour -->\n");
				textFile.write("ContextMenuStreetviewReverse        = Street Tour <--\n");
				textFile.write("ContextMenuMotorbike				= Video motocicletta\n");
				textFile.write("ContextMenu3D						= 3D\n");
				textFile.write("ContextMenu3DTour					= 3D Tour -->\n");
				textFile.write("ContextMenutourReverse				= 3D Tour <--\n");
				textFile.write("ContextMenuGame						= Gioco\n");
				textFile.write("ContextMenuClimbbybike				= Scala in bicicletta\n");
				textFile.write("ContextMenuZoomout					= Zoom indietro\n");
				textFile.write("ContextMenuQuaeldich				= Descrizione dettagliata\n");
				textFile.write("ContextMenuProfile					= Profilo\n");
				textFile.write("ContextMenuExplore					= Esplora in 3D\n");
				
				textFile.write("\n");
				textFile.write("EntryDialogTitle					= Benvenuti in Cycling the Alps!\n");
				textFile.write("EntryDialogShowAgain				= Non visualizzare piu questo filmato.\n");
				textFile.write("EntryDialogMessage1					= Chiudi questo messaggio per cominciare la tua fantastica esperienza virtuale sulle alpi.\n");
				textFile.write("EntryDialogMessage2					= Chiudi\n");
				textFile.write("EntryDialogMessage3					= Usa il pulsante destro del mouse sulle icone delle biciclette.\n");
				textFile.write("\n");
				textFile.write("MenuBarPasses2000					= 2000m - 2770m\n");
				textFile.write("MenuBarPasses1500					= 1500m - 1999m\n");
				textFile.write("MenuBarPasses1000					= 1000m - 1499m\n");
				textFile.write("MenuBarOtherPasses					=    0m -  999m\n");
				textFile.write("MenuBarToggleLayers					= Passi\n");
				textFile.write("MenuBarAdditionalInformation		= More\n");
				textFile.write("MenuBarComment						= Commenti\n");
				textFile.write("MenuBarLatest						= Novit�\n");
				textFile.write("MenuBarLanguages					= Lingue\n");
				textFile.write("MenuBarEnglish						= Inglese\n");
				textFile.write("MenuBarGerman						= Tedesco\n");
				textFile.write("MenuBarNetherlands					= Olandese\n");
				textFile.write("MenuBarItalian						= Italiano\n");
				textFile.write("MenuBarImpressum					= Impressum\n");
				textFile.write("MenuBarHelp							= Aiuto\n");
				textFile.write("MenuBarHelpme						= Aiutami!\n");
				textFile.write("MenuBarDisclaimer					= Disclaimer\n");
				textFile.write("MenuBarContact						= Contatti\n");
				textFile.write("MenuBarMissingPasses				= Passi mancanti\n");
				textFile.write("MenuBarProblems						= Problemi\n");
				textFile.write("MenuBarConversation					= Conversazione\n");
				textFile.write("MenuBarMountains4000				= Montagne 4000m\n");
				textFile.write("\n");
				textFile.write("news								= Notizie\n");
				textFile.write("\n");
				textFile.write("suggest 							= Ricerca\n");
				textFile.write("ReportProblem						= Segnala un problema\n");
				textFile.write("\n");
				textFile.write("embed								= Incorporare\n");
				textFile.write("embedNoPlay							= Incorporare no autoplay\n");
				textFile.write("embedHtml							= Incolla l&#145;HTML da incorporare nel sito web\n");
				textFile.write("OverviewOracle						= Panoramica\n");
				textFile.write("OverviewLink						= panoramica\n");
				textFile.write("\n");
				textFile.write("gameExplanation						= Usa i tasti delle freccie per girare questo passo in bicicletta. \n");
				textFile.write("GameExplanationShowAgain			= Non visualizzare piu questo chiarimento.\n");
				textFile.write("GameButton							= Inizia a girare in bicicletta questo passo!\n");
				textFile.write("\n");
				textFile.write("exploreExplanation					= Usa i seguenti tasti per esplorare questo passo.\n");
				textFile.write("Forwards							= Avanti\n");
				textFile.write("Backwards							= Indietro\n");
				textFile.write("Straferight							= Colpisci a destra\n");
				textFile.write("Strafeleft							= Colpisci a sinistra\n");
				textFile.write("Arrow								= Freccia su = Inclina verso l&#145;alto<br>Freccia gi&#249; = Inclina verso il basso<br>Freccia destra = Gira a destra<BR>Freccia sinistra = Gira a sinistra\n");
				textFile.write("Page								= Pagina su = Monta in sella<br>Pagina gi&#249; = Scendi a terra\n");
				textFile.write("ExploreButton						= Inzia ad esplorare questo passo!\n");

			}
			if (fileName.endsWith("MyMessages_fr.properties")) {
				textFile.write("ContextMenuZoomin					= Zoom avant\n");
				// textFile.write("ContextMenuToggleRoute				= \n");
				textFile.write("ContextMenuVideo					= Vid&#233;o\n");
				// textFile.write("ContextMenuPictures					= \n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				// textFile.write("ContextMenuBikemap					= \n");
				// textFile.write("ContextMenuStreetview				= \n");
//				textFile.write("ContextMenuStreetviewReverse        = \n");
				// textFile.write("ContextMenuMotorbike				= \n");
				// textFile.write("ContextMenu3D						= \n");
				// textFile.write("ContextMenu3DTour					= \n");
				// textFile.write("ContextMenuGame						=\n");
				// textFile.write("ContextMenuClimbbybike				= \n");
				// textFile.write("ContextMenuZoomout					= \n");
				// textFile.write("ContextMenuQuaeldich				= \n");
				// textFile.write("ContextMenuProfile					= \n");
				textFile.write("ContextMenuExplore					= 3D Explorer\n");
				textFile.write("\n");
				// textFile.write("EntryDialogTitle					= \n");
				// textFile.write("EntryDialogShowAgain				= \n");
				// textFile.write("EntryDialogMessage1					= \n");
				// textFile.write("EntryDialogMessage2					= \n");
				// textFile.write("EntryDialogMessage3					= \n");
				// textFile.write("\n");
				// textFile.write("webElementNews						= \n");
				// textFile.write("webElementComments					= \n");
				// textFile.write("webElementProblems					= \n");
				// textFile.write("webElementMissingPasses				= \n");
				// textFile.write("\n");
				// textFile.write("MenuBarPasses2000					= \n");
				// textFile.write("MenuBarPasses1500					= \n");
				// textFile.write("MenuBarPasses1000					= \n");
				// textFile.write("MenuBarOtherPasses					= \n");
				// textFile.write("MenuBarToggleLayers					= \n");
				// textFile.write("MenuBarAdditionalInformation		= \n");
				// textFile.write("MenuBarSleep						= \n");
				// textFile.write("MenuBarComment						= \n");
				// textFile.write("MenuBarLatest						= \n");
				// textFile.write("MenuBarLanguages					= \n");
				// textFile.write("MenuBarEnglish						= \n");
				// textFile.write("MenuBarGerman						= \n");
				// textFile.write("MenuBarNetherlands					= \n");
//				textFile.write("MenuBarItalian						= Italien\n");
				// textFile.write("MenuBarImpressum					= \n");
				// textFile.write("MenuBarHelp							= \n");
				// textFile.write("MenuBarHelpme						= \n");
				// textFile.write("MenuBarDisclaimer					= \n");
				// textFile.write("MenuBarContact						= \n");
				// textFile.write("MenuBarMissingPasses				= \n");
				// textFile.write("MenuBarProblems						= \n");
				// textFile.write("MenuBarConversation					= \n");
				// textFile.write("MenuBarMountains4000				= \n");
				// textFile.write("\n");
				// textFile.write("news								= \n");
				// textFile.write("\n");
				// textFile.write("suggest 							= \n");
				textFile.write("ReportProblem						= Signaler un probl�me\n");
				textFile.write("\n");
				textFile.write("embed								= Int&#233;grer\n");
				textFile.write("embedHtml							= Collez le code HTML pour l&#145;int&#233;grer sur un site Web\n");
				textFile.write("OverviewOracle						= Vue d ensemble\n");
				textFile.write("OverviewLink						= vue-ensemble\n");
			}
			if (fileName.endsWith("MyMessagesPlanned.properties") || fileName.endsWith("MyMessagesProTour.properties") || fileName.endsWith("MyMessagesClimbs.properties")) {
				textFile.write("ContextMenuZoomin					= Zoom in\n");
				textFile.write("ContextMenuToggleRoute				= Show Route\n");
				textFile.write("ContextMenuVideo					= Video\n");
				textFile.write("ContextMenuPictures					= Pictures\n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				textFile.write("ContextMenuBikemap					= Bikemap\n");
				textFile.write("ContextMenuStreetview				= Street Tour -->\n");
				textFile.write("ContextMenuStreetviewReverse        = Street Tour <--\n");
				textFile.write("ContextMenuMotorbike				= Motorbike Video\n");
				textFile.write("ContextMenu3D						= 3D\n");
				textFile.write("ContextMenu3DTour					= 3D Tour <--\n");
				textFile.write("ContextMenutourReverse				= 3D Tour -->\n");
				textFile.write("ContextMenuGame						= Game\n");
				textFile.write("ContextMenuClimbbybike				= Climb by bike\n");
				textFile.write("ContextMenuZoomout					= Zoom out\n");
				textFile.write("ContextMenuQuaeldich				= Qualedich\n");
				textFile.write("ContextMenuProfile					= Profile\n");
				textFile.write("ContextMenuExplore					= Explore in 3D\n");
			}
			if (fileName.endsWith("MyMessagesPlanned_de.properties") || fileName.endsWith("MyMessagesProTour_de.properties") || fileName.endsWith("MyMessagesClimbs_de.properties")) {
				textFile.write("ContextMenuZoomin					= Einzoomen\n");
				textFile.write("ContextMenuToggleRoute				= Toggle Route\n");
				textFile.write("ContextMenuVideo					= Video\n");
				textFile.write("ContextMenuPictures					= Bilder\n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				textFile.write("ContextMenuBikemap					= Bikemap\n");
				textFile.write("ContextMenuStreetview				= Street Tour -->\n");
				textFile.write("ContextMenuStreetviewReverse        = Street Tour <--\n");
				textFile.write("ContextMenuMotorbike				= Motorrad Video\n");
				textFile.write("ContextMenu3D						= 3D\n");
				textFile.write("ContextMenu3DTour					= 3D Tour <--\n");
				textFile.write("ContextMenutourReverse				= 3D Tour -->\n");
				textFile.write("ContextMenuGame						= Spiel\n");
				textFile.write("ContextMenuClimbbybike				= Climb by bike\n");
				textFile.write("ContextMenuZoomout					= Auszoomen\n");
				textFile.write("ContextMenuQuaeldich				= Qualedich\n");
				textFile.write("ContextMenuProfile					= Profile\n");
				textFile.write("ContextMenuExplore					= 3D Erkunden\n");
			}
			if (fileName.endsWith("MyMessagesPlanned_nl.properties") || fileName.endsWith("MyMessagesProTour_nl.properties") || fileName.endsWith("MyMessagesClimbs_nl.properties")) {
				textFile.write("ContextMenuZoomin					= Inzoomen\n");
				textFile.write("ContextMenuToggleRoute				= Fietsroute\n");
				textFile.write("ContextMenuVideo					= Video\n");
				textFile.write("ContextMenuPictures					= Foto&#145;s\n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				textFile.write("ContextMenuBikemap					= Bikemap\n");
				textFile.write("ContextMenuStreetview				= Street Tour -->\n");
				textFile.write("ContextMenuStreetviewReverse        = Street Tour <--\n");
				textFile.write("ContextMenuMotorbike				= Motor Video\n");
				textFile.write("ContextMenu3D						= 3D\n");
				textFile.write("ContextMenu3DTour					= 3D Tocht -->\n");
				textFile.write("ContextMenutourReverse				= 3D Tocht <--\n");
				textFile.write("ContextMenuGame						= Spel\n");
				textFile.write("ContextMenuClimbbybike				= Climb by bike\n");
				textFile.write("ContextMenuZoomout					= Uitzoomen\n");
				textFile.write("ContextMenuQuaeldich				= Qualedich\n");
				textFile.write("ContextMenuProfile					= Profiel\n");
				textFile.write("ContextMenuExplore					= 3D Verkennen\n");
			}
			if (fileName.endsWith("MyMessagesPlanned_it.properties") || fileName.endsWith("MyMessagesProTour_it.properties") || fileName.endsWith("MyMessagesClimbs_it.properties")) {
				textFile.write("ContextMenuZoomin					= Zoom avanti\n");
				textFile.write("ContextMenuToggleRoute				= Percorso \n");
				textFile.write("ContextMenuVideo					= Video\n");
				textFile.write("ContextMenuPictures					= Fotografie\n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				textFile.write("ContextMenuBikemap					= Itinerario ciclabile\n");
				textFile.write("ContextMenuStreetview				= Street Tour -->\n");
				textFile.write("ContextMenuStreetviewReverse        = Street Tour <--\n");
				textFile.write("ContextMenuMotorbike				= Video motocicletta\n");
				textFile.write("ContextMenu3D						= 3D\n");
				textFile.write("ContextMenu3DTour					= 3D Tour -->\n");
				textFile.write("ContextMenutourReverse				= 3D Tour <--\n");
				textFile.write("ContextMenuGame						= Gioco\n");
				textFile.write("ContextMenuClimbbybike				= Scala in bicicletta\n");
				textFile.write("ContextMenuZoomout					= Zoom indietro\n");
				textFile.write("ContextMenuQuaeldich				= Descrizione dettagliata\n");
				textFile.write("ContextMenuProfile					= Profilo\n");
				textFile.write("ContextMenuExplore					= Esplora in 3D\n");
			}
			if (fileName.endsWith("MyMessagesPlanned_fr.properties") || fileName.endsWith("MyMessagesProTour_fr.properties") || fileName.endsWith("MyMessagesClimbs_fr.properties")) {
				textFile.write("ContextMenuZoomin					= Zoom avant\n");
				// textFile.write("ContextMenuToggleRoute				= \n");
				textFile.write("ContextMenuVideo					= Vid&#233;o\n");
				// textFile.write("ContextMenuPictures					= \n");
				textFile.write("ContextMenuThreeSixty				= 360 Panorama\n");
				// textFile.write("ContextMenuBikemap					= \n");
				// textFile.write("ContextMenuStreetview				= \n");
				// textFile.write("ContextMenuMotorbike				= \n");
				// textFile.write("ContextMenu3D						= \n");
				// textFile.write("ContextMenu3DTour					= \n");
				// textFile.write("ContextMenuGame						=\n");
				// textFile.write("ContextMenuClimbbybike				= \n");
				// textFile.write("ContextMenuZoomout					= \n");
				// textFile.write("ContextMenuQuaeldich				= \n");
				// textFile.write("ContextMenuProfile					= \n");
				textFile.write("ContextMenuExplore					= 3D Explorer\n");
			}
			textFile.close();

		} catch (BiffException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
